const apiObj = new Object();
apiObj.msg = (title, duration = 1000, mask = false, icon = 'none') => {
    //统一提示方便全局修改
    if (Boolean(title) === false) {
        return;
    }
    uni.showToast({
        title,
        duration,
        mask,
        icon
    });
}
apiObj.loadingMsg = (title, mask = true) => {
    //统一提示方便全局修改
    //if(Boolean(title) === false){return;}
    uni.showLoading({ title, mask, });
}

//设置用户缓存token
apiObj.opeAuthToken = (obj) => {
    return '';
}

//获取本地比对过后的时间戳
apiObj.getLocalSystemTime = () => {
    return 0;
}

/**
 * 去除左右空格
 */
apiObj.trimStr = (str) => {
    if (str == '' || !str) {
        return '';
    }
    return str.replace(/(^\s*)|(\s*$)/g, "");
}


export { apiObj }